package com.hellobike.haxing.modules.pms.enums;

public enum PurchaseReturnStatusEnum {

    INIT("INIT", "初始化"),
    WAIT_RETURN("WAIT_RETURN", "待提货"),
    RETURNING("RETURNING", "提货中"),
    RETURN_SUCCESS("RETURN_SUCCESS", "退货成功"),
    RETURN_WAREHOUSE("RETURN_WAREHOUSE", "退货给仓库"),
    RETURN_SUPPLIER("RETURN_SUPPLIER", "退货给供应商"),
    RETURN_FAIL("RETURN_FAIL", "退货失败"),
    ;

    private String name;
    private String index;
    // 构造方法
    private PurchaseReturnStatusEnum(String index, String name) {
        this.name = name;
        this.index = index;
    }
    // 普通方法
    public static String getName(String index) {
        for (PurchaseReturnStatusEnum c : PurchaseReturnStatusEnum.values()) {
            if (c.getIndex().equals(index)) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getIndex() {
        return index;
    }
    public void setIndex(String index) {
        this.index = index;
    }
}
